Web pages typically have headers, footers and content. Headers and footers are often added to web pages as Server Side Includes (“SSIs”) using, for example, Apache's “mod include” module. Such systems for adding headers and footers to web pages may be convenient for adding headers and footers to simple web pages whose content is hosted by a single computing device. However, large websites generally require their code to be split into multiple applications. To handle this, a system architecture may be implemented including multiple layers of plural computing devices with one or more computing device devoted to each application. Using SSIs to include decorations in such architectures requires components, such as headers and footers, to be maintained in separate files. This may greatly increase the time and resources required for code maintenance and may increase the resource use of a front end web server.
To return a webpage with headers and footers added via an SSI in such a tiered system architecture, a web layer (i.e., front end) of the system architecture generally passes a request for the content of the web page to an application layer, the application layer passes the page content back to the web layer, the web layer then retrieves one or more segments of Hypertext Markup Language (“HTML”) (e.g., headers and/or footers) from a data store and inserts the HTML into the web page. Of course, a typical system architecture may include plural intermediate layers between a web layer and an application layer, such as caching layers and load balancing layers.
FIG. 1 illustrates a system for decorating web pages with headers and footers. As shown in FIG. 1, the web server 104 (e.g., a front end Apache server) receives requests for web pages 108. For example, in FIG. 1 the web server 104 accesses a cache 116 to access the content for first web page request (request 4505) associated with the first application 120. The web server 104 may also receive requests for a web page 108 associated with a second application 140. First application 120 and second application 140 may each return content for a web page to web server 104. Web server 104 may then insert decorations (e.g., headers and footers) into a webpage, for example for co-branding of web pages. Web server 104 may retrieve decorations according to SSIs which define pre-cached page segments configured to be directly inserted into the web pages from a data store docroot 112 Web server 104 may then insert the decorations into a web page and return the webpage in response to the request.
Decorating pages with SSIs may be resource intensive and modifications to decorations may be slow to deploy. Because page segments inserted via SSIs are pre-cached, for a user to make a change to a page segment, the user may be required to modify the page segment then run a script to deploy the modified page segment. Because changes may be slow to update through the deployment process, a website may be in an inconsistent state during implementation of changes (e.g., if decorators for each page on a website are modified, during the deployment process some pages may display old decorators while other pages display new decorators).
The system of FIG. 1 requires unwanted processing on web server 120 to insert the header and footer components. Because it is often desirable to provide different decorations for pages, for example for co-branding websites, the code for many different decorations may need to be maintained in many a data store accessible by web server 104. Thus, conventional methods of inserting custom headers and footers with custom declarations or SSIs make code maintenance difficult.
While systems and methods are described herein by way of examples and embodiments, those skilled in the art recognize that decorator proxies are not limited to the embodiments or drawings described. It should be understood that the drawings and description are not intended to limit embodiments to the particular form disclosed. Rather, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the appended claims. Any headings used herein are for organizational purposes only and are not meant to limit the scope of the description or the claims. As used herein, the word “may” is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including, but not limited to.